import './assets/main.css'

import { createApp } from 'vue'
import pinia from './stores/index'
import App from './App.vue'
import router from './router'
import i18n from './plugins/i18n'
import toast from './plugins/prompt'
import errorHandler from './plugins/error'
import globalComponents from './plugins/globalComponents'
// import './router/permission'
import setup from './utils/setup'

const app = createApp(App)

app.use(pinia)

await setup()

app
  .use(router)
  .use(errorHandler)
  .use(globalComponents)
  .use(i18n)
  .use(toast)
  .mount('#app')